package com.usac.arqui1.grupo2.proyecto1.menufragments;

import com.usac.arqui1.grupo2.proyecto1.R;
import android.annotation.SuppressLint;
import android.support.v4.app.Fragment;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class Efectos extends Fragment {

	Spinner spfondo;
	Spinner spletra;
	Spinner spefecto;
	Button botonvp;
	ArrayAdapter<String> adapter2;
	String spinnerfondos[] = { "Amarillo", "Celeste", "Rosado", "Blanco",
			"Azul", "Morado", "Verde", "Naranja" };
	String spinnerletras[] = { "Amarillo", "Celeste", "Rosado", "Blanco",
			"Azul", "Morado", "Verde", "Naranja" };

	String spinnerefectos[] = { "Fijo", "Derecha a Izquierda",
			"Derecha a Izquierda", "Arriba hacia abajo", "Abajo hacia arriba" };

	public Efectos() {

	}

	@Override
	@SuppressLint("CutPasteId")
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle saveInstanceState) {

		View v = inflater.inflate(R.layout.fragment_principal_efectos,
				container, false);

		ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(
				this.getActivity(), android.R.layout.simple_spinner_item);
		adapter.setDropDownViewResource(android.R.layout.simple_list_item_checked);

		String val = "";
		for (int i = 0; i < spinnerletras.length; i++) {
			val = spinnerletras[i];
			adapter.add(val);
		}
		spletra = (Spinner) v.findViewById(R.id.spinnerletra);
		spletra.setAdapter(adapter);

		ArrayAdapter<CharSequence> adapter2 = new ArrayAdapter<CharSequence>(
				this.getActivity(), android.R.layout.simple_spinner_item);
		adapter2.setDropDownViewResource(android.R.layout.simple_list_item_checked);

		for (int i = 0; i < spinnerfondos.length; i++) {
			val = spinnerfondos[i];
			adapter2.add(val);
		}
		spfondo = (Spinner) v.findViewById(R.id.spinnerfondo);
		spfondo.setAdapter(adapter2);

		ArrayAdapter<CharSequence> adapter3 = new ArrayAdapter<CharSequence>(
				this.getActivity(), android.R.layout.simple_spinner_item);
		adapter3.setDropDownViewResource(android.R.layout.simple_list_item_checked);

		for (int i = 0; i < spinnerefectos.length; i++) {
			val = spinnerefectos[i];
			adapter3.add(val);
		}
		spefecto = (Spinner) v.findViewById(R.id.spinnerefectos);
		spefecto.setAdapter(adapter3);

		return v;
	}

}
